<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var reg=/^\w{4,20}@([a-z]|[A-Z]|d){2,}\.(com|cn|net)/
    var email='=1263836826@qq.com'
    console.log(reg.test(email))
</script>
</body>
</html>